import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @author virustaruin
 * 
 */
public class ParkingSystemClientMain {

	/**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {

		ParkingSystem ps = new ParkingSystem();

		while (true) {

			BufferedReader inputLine = new BufferedReader(
					new InputStreamReader(System.in));
			String userInputText = null;

			userInputText = inputLine.readLine();

			if (userInputText.equals("9999")) {
				break;
			} else {
				ps.start(userInputText);
			}
		}

	}

}
